<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>v-if和v-show</title>
	<style>
		.box{
			height: 300px;	
			width: 300px;	
			background-color: red;
		}
		.box1{
			height: 300px;	
			width: 300px;	
			background-color: forestgreen;
		}
	</style>
</head>
<body>
	
    <div id="div">
    	<button v-on:click="isShow = !isShow">点击切换</button>
    	<div class="box" v-if="isShow"></div>
    	<div class="box1" v-show="isShow"></div>
    </div>
    <script src="vue.js"></script>
    <script>
    	const vm=new Vue({
    		el:"#div",
    		data:{
    			isShow:true
    		}
    	})
    </script>

</body>
</html>